.blog-post-page {
  padding-bottom: 80px;
}

.blog-post-container {
  max-width: 800px;
  margin: 0 auto;
}

.blog-post-header {
  text-align: center;
  margin-bottom: 40px;
}

.post-meta {
  margin-bottom: 20px;
}

.post-category {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-right: 15px;
}

.post-date {
  color: var(--light-text-color);
  font-size: 0.9rem;
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  line-height: 1.3;
}

.post-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.post-tag {
  padding: 5px 15px;
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.post-tag:hover {
  background-color: rgba(37, 99, 235, 0.2);
}

.post-featured-image {
  margin-bottom: 40px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-content {
  margin-bottom: 50px;
  padding: 30px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* GitHub Markdown 样式自定义 */
.markdown-body {
  box-sizing: border-box;
  min-width: 200px;
  max-width: 100%;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
}

/* 自定义 GitHub Markdown 样式 */
.markdown-body a {
  color: var(--primary-color) !important;
}

.markdown-body a:hover {
  color: var(--secondary-color) !important;
  text-decoration: underline;
}

/* 代码块的自定义样式 */
.markdown-body pre {
  background-color: #1e293b !important;
  border-radius: 8px !important;
  margin: 16px 0 !important;
  padding: 0 !important;
}

.markdown-body pre > div {
  margin: 0 !important;
  border-radius: 8px !important;
}

/* 行内代码自定义样式 */
.markdown-body :not(pre) > code {
  color: #d63384 !important;
  background-color: rgba(175, 184, 193, 0.2) !important;
  padding: 0.2em 0.4em !important;
  border-radius: 6px !important;
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace !important;
}

/* 表格样式增强 */
.markdown-body table {
  width: 100% !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.markdown-body table tr:nth-child(2n) {
  background-color: #f6f8fa !important;
}

.markdown-body table tr:hover {
  background-color: rgba(37, 99, 235, 0.05) !important;
}

/* 引用块样式增强 */
.markdown-body blockquote {
  border-left: 0.25em solid var(--primary-color) !important;
  color: #57606a !important;
  padding: 0 1em !important;
  background-color: rgba(37, 99, 235, 0.05) !important;
}

/* 标题样式增强 */
.markdown-body h1,
.markdown-body h2 {
  border-bottom: 1px solid var(--border-color) !important;
  padding-bottom: 0.3em;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: var(--text-color) !important;
  font-weight: 600 !important;
}

/* 图片样式增强 */
.markdown-body img {
  max-width: 100% !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
  border-radius: 8px !important;
  display: block !important;
  margin: 20px auto !important;
}

/* 代码行号样式 */
.markdown-body .linenumber {
  color: rgba(255, 255, 255, 0.5) !important;
  min-width: 1.5em !important;
  text-align: right !important;
  padding-right: 1em !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .post-content {
    padding: 20px;
  }
  
  .markdown-body {
    font-size: 16px !important;
  }
  
  .markdown-body pre {
    font-size: 14px !important;
  }
  
  .markdown-body h1 {
    font-size: 1.8em !important;
  }
  
  .markdown-body h2 {
    font-size: 1.5em !important;
  }
  
  .markdown-body h3 {
    font-size: 1.3em !important;
  }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  .markdown-body {
    color-scheme: dark !important;
  }
}

.post-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  margin-bottom: 50px;
}

.post-share {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.post-share span {
  margin-right: 15px;
  font-weight: 500;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  background-color: #f1f5f9;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.share-btn:hover {
  background-color: #e2e8f0;
}

.post-navigation {
  display: flex;
  justify-content: center;
}

.back-to-blog {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.back-to-blog:hover {
  background-color: var(--secondary-color);
}

.related-posts {
  margin-top: 70px;
}

.related-posts h2 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.related-post-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.related-post-card:hover {
  transform: translateY(-10px);
}

.related-post-image {
  height: 180px;
  overflow: hidden;
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-post-card:hover .related-post-image img {
  transform: scale(1.05);
}

.related-post-content {
  padding: 20px;
}

.related-post-date {
  display: block;
  color: var(--light-text-color);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.related-post-title {
  font-size: 1.1rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.related-post-title a {
  color: var(--text-color);
  transition: color 0.3s ease;
}

.related-post-title a:hover {
  color: var(--primary-color);
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 500;
  position: relative;
}

.read-more::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.read-more:hover::after {
  width: 100%;
}

@media (max-width: 992px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-post-page {
    padding-bottom: 60px;
  }
  
  .post-title {
    font-size: 2rem;
  }
  
  .post-content {
    font-size: 1rem;
  }
  
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}
